#ifndef NUMBERHANDLER_H
#define NUMBERHANDLER_H

#include <QObject>
#include <QTimer>

class NumberHandler : public QObject
{
    Q_OBJECT
    Q_PROPERTY(int num MEMBER number NOTIFY numChanged)
public:
    explicit NumberHandler(QObject *parent = nullptr);
    Q_INVOKABLE void startTimer(int timeout);

signals:
    void numChanged();

public slots:
    void handleTimeOut();
private:
    QTimer *timer;
    int number;
};

#endif // NUMBERHANDLER_H
